package cn.buildoncloud.labor.workermanapplet.config;

import cn.buildoncloud.labor.workermanapplet.util.AppletUtil;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Description: cn.buildoncloud.labor.workermanapplet.config
 * Created by CuiZibo on 2018/11/20 18:15
 */

@Configuration
public class AppletConfig {

    @Value("${applet.appid}")
    private String appid;

    @Value("${applet.secret}")
    private String secret;

    @Value("${applet.grantType}")
    private String grantType;

    @Bean
    public int initAppletPropertiesStaticData() {
        AppletUtil.setAppid(appid);
        AppletUtil.setSecret(secret);
        AppletUtil.setGrantType(grantType);
        return 0;
    }

}
